<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@ page isELIgnored="false"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="<s:url value="/resources"/>/css/style_new.css" rel="stylesheet" type="text/css" />
    <link href="<s:url value="/resources"/>/css/main_new.css" rel="stylesheet" type="text/css" />
    <link href="<s:url value="/resources"/>/css/jquery.loadmask.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<s:url value="/resources"/>/css/cupertino/jquery-ui.min.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<s:url value="/resources"/>/css/ui.jqgrid.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<s:url value="/resources"/>/css/ui.multiselect.css" />
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery-ui.custom.min.js"></script> 
	<script type="text/javascript" src="<s:url value="/resources"/>/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery.form.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/json2.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery.validate.min.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/messages_zh.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/i18n/grid.locale-cn.js"></script>    
    <script type="text/javascript" src="<s:url value="/resources"/>/js/jquery.jqGrid.min.js"></script>
    <script type="text/javascript" src="<s:url value="/resources"/>/js/jquery.loadmask.min.js"></script>
    <style type="text/css">
      .myth{
		font-size:16px ; 
		font:bold 16px/24px Arial, Helvetica, sans-serif; 
		color:#327C8E;
	   }
    </style>
 <script type="text/javascript">  
    $(function(){ 
		    $( "#datepicker" ).datepicker($.datepicker.regional[ "zh-CN" ]);
	        $( "#datepicker1" ).datepicker($.datepicker.regional[ "zh-CN" ]);
	        tongjiHt();
		 });

		// 查询
		function tongjiHt(){ 
		$("#myTongj").mask("统计中，请等待。。。");
		var formdata = $("#form1").serialize(); 
		//alert(formdata);
		  $.getJSON("<s:url value="/cxtj"/>/tongjiHt?"+formdata,function(data){
		            for(var i = 0; i< data.length ;i++)
			            {
			                $("#myTongj").unmask();
			                $("#r"+i+"d0").val(data[i].hetfens);
			                $("#r"+i+"d1").val(data[i].hetshul);
			                $("#r"+i+"d2").val(data[i].hetjine); 
			            }
	           }); 
		}
</script>  

</head>
<body>  
<div class="container">
 <div class="containerbox">
 <div class="search mt10" id="list_search">
<form id="form1" method="post">
<table  class="search-table"  style="width:90%"  cellpadding="0" cellspacing="0" border="0"> 
        <tr>
        	<td >开始日期:</td>
            <td>
            	<input  id="datepicker" type="text" class="form-textbox" style="width: 200px;" name="aa" /> 
            </td>
            <td> 结束日期:</td>
            <td >
            	<input  id="datepicker1" type="text" class="form-textbox" style="width: 200px;" name="bb" /> 
            </td>
             <td> 交易对方:</td>
            <td >
            	<input type="text" class="form-textbox" style="width: 200px;" name="cc" /> 
            </td>
          </tr> 
          <tr>
             <td  class="pr10 search-table-70">煤种:</td>
            <td >
         	    <select  class="form-textbox" style="width: 200px;"  name="dd"  >
         	            <option value="-1">==请选择==</option>
						<c:forEach var="meiz" items="${meizlist}">
							<option value="${meiz.diccode}">${meiz.dicname}</option>
						</c:forEach>
			   </select>
            </td>
            <td  class="pr10 search-table-70">品种:</td>
            <td colspan="3" style="float:left">            	 
          	     <select  class="form-textbox" style="width: 200px;"  name="ee" >
          	            <option value="-1">==请选择==</option>
						<c:forEach var="pinz" items="${pinzlist}">
							<option value="${pinz.diccode}">${pinz.dicname}</option>
						</c:forEach>
				</select>
            </td>
           </tr> 
           <tr>
	         <td colspan="6" style="float:right">
	             <input  type="button" class="form-button-query form-button" value="统计" onclick="tongjiHt();"/>
	             <input  type="reset" value="重置"  class="form-button-reset form-button" />
	         </td>
           </tr>        
  </table>
  </form>
  </div>
  <div class="containerbox" id ="myTongj">
   <div class="search mt10">
   <table id="tab1" align="center" cellpadding="0" cellspacing="0" class="content_gridview">
	    <tr>
	         <th align="center" class="myth">交易类型</th>
	         <th align="center" class="myth">买卖类型</th>
	         <th align="center" class="myth">合同份数</th>
	         <th align="center" class="myth">合同数量</th>
	         <th align="center" class="myth">合同金额</th>
	    </tr>
	    <tr>
	        <td rowspan="3">挂牌</td>
	        <td>小计</td>
	        <td><input type="text" id="r0d0" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r0d1" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r0d2" class="shortdisplaybox"  readonly="readonly" /></td>
	    </tr>
	    <tr>
	        <td>买入</td>
	        <td><input type="text" id="r1d0" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r1d1" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r1d2" class="shortdisplaybox"  readonly="readonly" /></td>
	    </tr>
	     <tr>
	        <td>卖出</td>
	        <td><input type="text" id="r2d0" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r2d1" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r2d2" class="shortdisplaybox"  readonly="readonly" /></td>
	    </tr>
	     <tr>
	        <td rowspan="3">竞价</td>
	        <td>小计</td>
	        <td><input type="text" id="r3d0" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r3d1" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r3d2" class="shortdisplaybox"  readonly="readonly" /></td>
	    </tr>
	    <tr>
	        <td>买入</td>
	        <td><input type="text" id="r4d0" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r4d1" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r4d2" class="shortdisplaybox"  readonly="readonly" /></td>
	    </tr>
	     <tr>
	        <td>卖出</td>
	        <td><input type="text" id="r5d0" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r5d1" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r5d2" class="shortdisplaybox"  readonly="readonly" /></td>
	    </tr>
	     <tr>
	        <td rowspan="3">邀约</td>
	        <td>小计</td>
	        <td><input type="text" id="r6d0" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r6d1" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r6d2" class="shortdisplaybox"  readonly="readonly" /></td>
	    </tr>
	    <tr>
	        <td>买入</td>
	        <td><input type="text" id="r7d0" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r7d1" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r7d2" class="shortdisplaybox"  readonly="readonly" /></td>
	    </tr>
	     <tr>
	        <td>卖出</td>
	        <td><input type="text" id="r8d0" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r8d1" class="shortdisplaybox"  readonly="readonly" /></td>
	        <td><input type="text" id="r8d2" class="shortdisplaybox"  readonly="readonly" /></td>
	    </tr>
   </table>	
   </div>
   </div>    
   </div>
</div> 
</body>
</html>